package com.xf.day04
import org.apache.spark.{SparkConf, SparkContext}

object Test03 {
  def main(args: Array[String]): Unit = {
    // 创建 SparkConf 对象
    val conf = new SparkConf()
      .setAppName("WordCount")
      .setMaster("local[*]")
      .set("spark.ui.port", "8080")
      .set("spark.driver.host", "127.0.0.1")

    // 创建 SparkContext 对象
    val sc = new SparkContext(conf)
    val data = Array(1,2,3,4,5)
    val rdd1 = sc.parallelize(data)

    val value = rdd1.map(x => x + 10)

    value.foreach(println)
  }
}
